package com.supercommons.swagger;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration;

@Configuration
@Import({Swagger2DocumentationConfiguration.class})
// application.yml 配置文件是否有定义 spring.swagger.enabled  否则默认为 true
@ConditionalOnProperty(name = "spring.swagger.enabled", havingValue = "true")
public class Swagger2Configuration {
}
